import http from "../../utils/http"
export interface UserManageItm{
    _id?: string,
    title?:string ,
    icon?:string,
    component?:string ,
    path?: string,
    pid: string,
    order?:string
    show?: boolean,
}
export interface Creator{
    creator?: string
}
const authorityMenu = {
    // 查询用户分组数据
    // search: (data?: object) => http.post('/userGroups/search', data),
    search:function(data?: object){
        return  http.post('/menus/search', data)
    },
    // // 新增用户分组数据
    add: (data:UserManageItm&Creator ) => http.post('/menus/add', data),
    // // 删除用户分组数据
    remove: (data: object) => http.delete('/menus/remove', data),
    // // 修改用户分组数据
    update: (data: UserManageItm) => http.put('/menus/update ', data)
}

export default authorityMenu